#ifndef _FNT_COLOR_WIDGET_H_
#define _FNT_COLOR_WIDGET_H_

#include <QWidget>

struct ColorWidgetPriv;
class ColorWidget: public QWidget {
	Q_OBJECT;
	friend struct ColorWidgetPriv;
	ColorWidgetPriv*const priv;
Q_SIGNALS:
	void colorChanged(const QColor& c);
	protected:
	void mouseReleaseEvent(QMouseEvent* event) override;
	void paintEvent(QPaintEvent* event) override;
	public:
	ColorWidget(const QString& title, const QString& desc, QWidget* par);
	~ColorWidget();

	void setColor(const QColor& c);
	const QColor& color() const;

	QSize minimumSizeHint() const override;
	QSize sizeHint() const override;
};

#endif
